package br.unicamp.mc933;

import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

import com.google.android.maps.MapController;
import com.google.android.maps.MapView;

public class GPSLocationManager implements LocationListener {
	MapView mapView;
	MapController mapController;
	MyLocation myLocation;

	private Context context;

	public GPSLocationManager(Context context, MapView map) {
		this.context = context;
		this.mapView = map;
		this.mapController = map.getController();

	}

	@Override
	public void onLocationChanged(Location location) {
//		GeoPoint newPoint = new GeoPoint((int)(location.getLatitude() * 1E6), (int)(location.getLongitude() * 1E6));
//		mapController.animateTo(newPoint);
	}

	@Override
	public void onProviderDisabled(String provider) {}

	@Override
	public void onProviderEnabled(String provider) {}

	@Override
	public void onStatusChanged(String provider, int status, 
			Bundle extras) {}
	
	public Context getContext () {
		return this.context;
	}

}
